//var concatFile = require('gulp-concat')
//    , uglifyJS = require('gulp-uglify')
//    , amdOptimize = require('amd-optimize');
//
//gulp.task('b', function () {
//    return gulp.src('1.0/source/js**/*.js')
//        .pipe(amdOptimize('test', {
//            configFile: './js/require-config.js',
//            findNestedDependencies: true,
//            include: false
//        }))
//        .pipe(concatFile('test.js'))
//        // .pipe(uglifyJS('test.js'))
//        .pipe(gulp.dest('./jsbuild/'));
//});
//

var gulp = require("gulp");
var amdOptimize = require("amd-optimize");
var concat = require('gulp-concat');

gulp.task("default", function () {
    return gulp.src('1.0/assets/js**/*.js') //需要合并的代码
        .pipe(amdOptimize("1.0/assets/js/views/common.min"))   //主入口文件
        .pipe(concat("result.js"))  //合并后文件
        .pipe(gulp.dest("dist"));  //输出目录

});